package com.ruoyi.hqfinance.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.hqfinance.domain.HqBaseAccountDealDetail;
import com.ruoyi.hqfinance.domain.vo.HqBaseAccountDealDetailVo;
import com.ruoyi.hqfinance.mapper.HqBaseAccountDealDetailMapper;
import com.ruoyi.hqfinance.service.HqBaseAccountDealDetailService;
import com.ruoyi.logistic.domain.PageDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class HqBaseAccountDealDetailServiceImpl implements HqBaseAccountDealDetailService {
    @Autowired
    private HqBaseAccountDealDetailMapper hqBaseAccountDealDetailMapper;
    @Override
    public List<HqBaseAccountDealDetail> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return hqBaseAccountDealDetailMapper.selectAll();
    }

    @Override
    public Boolean insert(HqBaseAccountDealDetail hqBaseAccountDealDetail) {
        return hqBaseAccountDealDetailMapper.insert(hqBaseAccountDealDetail);
    }

    @Override
    public Boolean update(HqBaseAccountDealDetail hqBaseAccountDealDetail) {
        return hqBaseAccountDealDetailMapper.update(hqBaseAccountDealDetail);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return hqBaseAccountDealDetailMapper.deleteById(id);
    }

    @Override
    public List<HqBaseAccountDealDetail> search(HqBaseAccountDealDetailVo hqBaseAccountDealDetailVo) {
        PageHelper.startPage(hqBaseAccountDealDetailVo.getPageDate());
        return hqBaseAccountDealDetailMapper.search(hqBaseAccountDealDetailVo);
    }
}
